package com.hyt.it.ogt.ks.feign.hystrix;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

import com.hyt.core.exception.NestedBusinessException;
import com.hyt.it.ogt.ks.feign.LoginClient;

@Component
public class LoginClientHystrix implements LoginClient {

    private Logger logger = LoggerFactory.getLogger(LoginClientHystrix.class);

    @Override
    public Boolean revokeToken(@RequestParam(value = "access_token") String access_token, @RequestParam(value = "client_id") String client_id, @RequestParam(value = "client_secret") String client_secret) {
        logger.error("#设置token失效失败，进入熔断");
        throw new NestedBusinessException("设置token失效失败");
    }
}
